Ext.define('DeftQuickStart.controller.MainController', {
	extend: 'Deft.mvc.ViewController',
	inject: ['userStore'],
	
	control:{
		idFilter: {
			change: 'onFilterChange'
		}
	},
	
	config: {
		userStore: null
	}
	init: function(){
		console.log("controller is created");
		this.callParent(arguments);
		this.testView();
	},
	testView: function(){
		Ext.log({dump: this.getIdFilter()}, 'Checkbox');
		Ext.log({dump: this.getView()}, 'View (GridPanel)');
	},
	
	onFilterChange: function(checkbox, value){
		if(value){
			this.getUserStore().filter('id','Id');
		}else{
			this.getUserStore().clearFilter();
		}
	}
});